<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>二手车交易信息</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link rel="stylesheet" type="text/css"
			href="mok/usedcar/css/usedCarSale.css">
		<link rel="stylesheet" type="text/css"
			href="mok/usedcar/css/usedCarSaleDetail.css">
		<script type="text/javascript" src="mok/usedcar/js/jquery1.4.4.js"></script>
	</head>

	<body>
		<div id="main">

			<div class="col_sub mainTitle">
				<h1>
					${request.usedCarSale.title}
				</h1>
				<div class="mtit_con c_999 f12 clearfix">
					<ul class="mtit_con_left fl">
						<li class="time">
							<fmt:formatDate value="${request.usedCarSale.releaseTime}"
								pattern="yyyy.MM.dd" />
						</li>
						<li class="count">
							<em id="totalcount">${request.usedCarSale.browseNum}</em>次
						</li>
					</ul>
				</div>
			</div>

			<div class="col_sub gallery">
				<div class="g_img">
					<span><img id="img1" title="${request.usedCarSale.title}" />
					</span>
				</div>
				<div class="g_thumb">
					<a id="img_scrollLeft" class="icon_left"></a>
					<a id="img_scrollRight" class="icon_right"></a>
					<div class="g_thumb_main">
						<ul id="img_smalls">
							<s:iterator var="url" value="#request.imagesUrl">
								<li>
									<img src="${url}" />
								</li>
							</s:iterator>
						</ul>
					</div>
				</div>
			</div>

			<div class="col_sub sumary">
				<ul class="suUl">
					<li>
						<div class="su_tit">
							价&nbsp;&nbsp;&nbsp;&nbsp;格：
						</div>
						<div class="su_con">
							<span class="price c_f50">${request.usedCarSale.money}</span>万元
						</div>
					</li>
					<li>
						<div class="su_tit">
							车型名称：
						</div>
						<div class="su_con" style="font-size: 14px;">
							<a href="#" target="_blank">${request.carBasicInfo.brand}-${request.carBasicInfo.department}-${request.carBasicInfo.carType}</a>
						</div>
					</li>
					<li>
						<div class="su_tit">
							联&nbsp;系&nbsp;人：
						</div>
						<span class="phone" style="font-style: normal">${request.usedCarSale.name}</span>
					</li>
					<li>
						<div class="su_tit">
							联系方式：
						</div>
						<div class="su_con">
							<span class="phone">${request.usedCarSale.telephone }</span>
					</li>
				</ul>
			</div>


			<div class="col_sub description cb">
				<header id="tabHeader" class="des_tit pr">
				<p class="desExtra">
					<a href="" target="_blank" rel="nofollow"><i
						class="icon_help mr5"></i>查看详细配置参数</a>
				</p>
				<ul class="desMenu clearfix">
					<li class="cur">
						<span>详细描述</span>
					</li>
				</ul>
				</header>
				<section class="des_con">
				<div class="none cur">

					<ul class="ulDec clearfix">
						<li class="item ">
							<span class="it_l fb">车辆颜色</span>
							<span class="it_r">${request.usedCarSale.color}色</span>
						</li>
						<li class="item fr">
							<span class="it_l fb">行驶里程</span>
							<span class="it_r">${request.usedCarSale.mileage}万公里</span>
						</li>
						<li class="item ">
							<span class="it_l fb">车辆排量</span>
							<span class="it_r">${request.carBasicInfo.dispalcement}升</span>
						</li>
						<li class="item fr">
							<span class="it_l fb">事故历史</span>
							<span class='it_r'><c:choose>
									<c:when test="${request.usedCarSale.isAccident == 0}">无重大事故</c:when>
									<c:when test="${request.usedCarSale.isAccident == 1}">有重大事故</c:when>
								</c:choose>
							</span>
						</li>
						<li class="item ">
							<span class="it_l fb">变&nbsp;&nbsp;速&nbsp;&nbsp;箱</span>
							<span class="it_r">${request.carBasicInfo.gearbox}</span>
						</li>
						<li class="item fr">
							<span class="it_l fb">维护保养</span>
							<span class='it_r'><c:choose>
									<c:when test="${request.usedCarSale.isMaintain == 0}">无4S店保养</c:when>
									<c:when test="${request.usedCarSale.isMaintain == 1}">定期4S店保养</c:when>
								</c:choose> </span>
						</li>
						<li class="item fr">
							<span class="it_l fb">外观成色</span>
							<span class='it_r'><c:choose>
									<c:when test="${request.usedCarSale.isAppearance == 0}">成色极新</c:when>
									<c:when test="${request.usedCarSale.isAppearance == 1}">成色较新</c:when>
									<c:when test="${request.usedCarSale.isAppearance == 2}">成色一般</c:when>
									<c:when test="${request.usedCarSale.isAppearance == 3}">成色较差</c:when>
								</c:choose>
							</span>
						</li>
						<li class="item ">
							<span class="it_l fb">驱动方式</span>
							<span class="it_r">${request.carBasicInfo.driveMode}</span>
						</li>
						<li class="item fr">
							<span class="it_l fb">内饰状况</span>
							<span class='it_r'><c:choose>
									<c:when test="${request.usedCarSale.isInterior == 0}">内饰有缺陷</c:when>
									<c:when test="${request.usedCarSale.isInterior == 1}">内饰完好</c:when>
								</c:choose>
							</span>
						</li>
						<li class="item ">
							<span class="it_l fb">证件手续</span>
							<span class='it_r'><c:choose>
									<c:when test="${request.usedCarSale.isCertificate == 0}">证件不齐全</c:when>
									<c:when test="${request.usedCarSale.isCertificate == 1}">证件齐全</c:when>
								</c:choose>
							</span>
						</li>
						<li class="item ">
							<span class="it_l fb">年检到期</span>
							<span class="it_r"> <fmt:formatDate
									value="${request.usedCarSale.annualDate}" pattern="yyyy年MM月" />年检到期
							</span>
						</li>
						<li class="item fr">
							<span class="it_l fb">上市日期</span>
							<span class="it_r"><fmt:formatDate
									value="${request.carBasicInfo.marketTime}" pattern="yyyy年MM月" />
							</span>
						</li>
						<li class="item ">
							<span class="it_l fb">交&nbsp;&nbsp;强&nbsp;&nbsp;险</span>
							<span class="it_r"> <fmt:formatDate
									value="${request.usedCarSale.compulsoryDate}"
									pattern="yyyy年MM月" />交强险到期 </span>
						</li>
						<li class="item fr">
							<span class="it_l fb">生产状态</span>
							<span class="it_r"> <c:choose>
									<c:when test="${request.carBasicInfo.status == 0}">停产</c:when>
									<c:when test="${request.carBasicInfo.status == 1}">在产</c:when>
								</c:choose> </span>
						</li>
					</ul>
					<br />
					<div class="descriptionBox">
						<p class='kw_link'>
							${request.usedCarSale.content }
						</p>
						<p>
							联系我时，请说是在乐软汽后网上看到的，谢谢！
						</p>
					</div>
					<div class="descriptionImg">
						<s:iterator var="url" value="#request.imagesUrl">
							<img src="${url}" />
						</s:iterator>
					</div>
				</div>




			</div>

			<script type="text/javascript">
$(document).ready(function() {
var allImg = $("#img_smalls>li");
var maxCount = Math.ceil(allImg.length/4);
var moveCount = 1;
var img_smalls = $('#img_smalls');
showPointer(allImg[0]);
allImg.each(function(){
$(this).hover(function(){
showPointer(this);
}).hover(function(){
showPointer(this);
});
});
function showPointer(li){
allImg.each(function(){
if (this == li) {
$(this).addClass("hover");
$('#img1').attr('src', $(this).children().eq(0).attr('src').replace("tiny", "small"));
}
else {
$(this).removeClass("hover");
}
});
}
img_smalls.css('width',(allImg.length)*93);
$('#img_scrollLeft').click(function(){
if (img_smalls.is(":animated")) {
return;
}
if(moveCount>1){
img_smalls.animate({"left":img_smalls.position().left+204});
moveCount--;
}
});
$('#img_scrollRight').click(function(){
if (img_smalls.is(":animated")) {
return;
}
if(moveCount<maxCount){
img_smalls.animate({"left":img_smalls.position().left-204});
moveCount++;
}
});
var desMenulis = $('ul.desMenu > li');
var des_condivs = $('.des_con > div');
desMenulis.unbind("click");
var arr_lis=[];
$.each(desMenulis,function(n,i){
if(i.id!="baozhangTab")arr_lis.push(i);
})
desMenulis.click(function(){
var index = $(arr_lis).index(this);
$(this).addClass('cur').siblings().removeClass('cur');
if (this.id == "baozhangTab") {
des_condivs.eq(0).show().siblings().hide();
}
else {
des_condivs.eq(index).show().siblings().hide();
}
if (this.id == "hangQingTab") {
var currUrl=window.location.href;
var log='sendtime='+getShowData()+'&cate=4,29&local=79&infoid=13492969585801&url='+currUrl+'&cxhq=1&type=ershouche&pinpai=大众&chexi=辉腾&chexing=辉腾';
clickLog(log);
}
})
$("#tabHeader").smartFloat();
var obj=$("#tabHeader").position();
if(document.getElementById("baozhangTit")){
var objtit=$("#baozhangTit").position().top-100;
}
$("#tabHeader>ul>li").click(function(){
var objtop_h=$($(".detailTopBanner")[0]).is(":visible")?(obj.top+60):obj.top;
var objtit_h=$($(".detailTopBanner")[0]).is(":visible")?(objtit+110):objtit;
$(document).scrollTop(objtop_h);
if (this.id == "baozhangTab") {
$(document).scrollTop(objtit_h);
}
})
function getShowData() {
var date = new Date(); //日期对象
var now = "";
now += date.getFullYear() + "-";
now += (date.getMonth() + 1) + "-";
now += date.getDate() + " ";
now += date.getHours() + "-";
now += date.getMinutes() + "-";
now += date.getSeconds();
return now;
}
var logremen="cate=4,29&local=79&infoid=13492969585801&catename=ershouche_detail_right_hot";
var logSamePriceBottom="cate=4,29&local=79&infoid=13492969585801&catename=ershouche_detail_bottom_relatedprice";
var logSameCarsBottom="cate=4,29&local=79&infoid=13492969585801&catename=ershouche_detail_bottom_relatedseries";
$("#remenRecommend a").click(function(){
if(typeof clickLog=="function"){
clickLog(logremen);
}
})
$("#samePriceBottomRecommend a").click(function(){
if(typeof clickLog=="function"){
clickLog(logSamePriceBottom);
}
})
$("#sameCarsBottomRecommend a").click(function(){
if(typeof clickLog=="function"){
clickLog(logSameCarsBottom);
}
})
});
</script>
	</body>
</html>
